This invention relates generally to computer systems and more particularly to binary translation performed in a computer system.
As it is known in the art, computer systems which generally include a central processing unit (CPU), a main memory and an input/output device interconnected by a system bus are used to execute computer programs to perform a useful task. One type of computer program is an operating system which is used to interface the CPU to an application program. The aforementioned application program is used by a user of the computer system to perform the useful task. The operating system typically includes software resources needed by the computer system to interface hardware elements to the computer system as well as to interface the application program with other programs executing in a computer system.
Application programs typically include programs such as word processors which execute in the computer system under the control of the operating system. An application program typically includes one or more binary image containing machine instructions for execution in a computer system. One technique commonly used to produce the binary image includes compiling source code written in the programming language to produce object code. The object code is usually linked with a linker to produce the binary image. The source code generally comprises one or more statements written in a programming language, such as one of the well-known commercially available C, C++, or Fortran programming languages. The object code generally comprises machine instructions and data. The machine instructions are typically executed by a computer processor in a computer system.
It is generally known that binary images or machine executable programs comprising an application program are made for execution in a computer system of a particular computer architecture or instruction set as well as the particular operating system. Typically, binary images made for one architecture and operating system cannot execute on a different architecture and/or operating system.
New architectures are developed to provide significant performance improvements for hardware associated with the architecture. However, one drawback to a new architecture is that existing binary images comprising an application that execute on an older architecture cannot directly run on a newer architecture due to different instruction sets of the new and old architectures. While it is desirable to migrate to a new architecture that may be faster or more efficient than an older architecture, one of the most significant drawbacks for a user is the result that an existing application and data files used on an old architecture are not directly transferrable for use in the new architecture.
As a result, techniques have been developed to assist users in migrating applications and data from an older architecture to a new architecture. One such technique includes translating a binary image designed for execution in an older computer architecture to another binary image for execution in a new computer architecture.
One problem in performing binary translations is formulating an efficient method for transforming a first binary image associated with a first computer architecture to a second binary image associated with a second computer architecture. The method should also be flexible and not unduly restrict the binary translation process.